#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_botaoIniciar_clicked()
{
				controller = new Controller(ui->spinBoxProdutor->value(),ui->spinBoxConsumidor->value(),ui->spinBoxBufferSize->value(),ui->spinBoxTotalProdutos->value(),ui->tableWidgetListaThreads);
				controller->setTable(ui->tableWidgetListaProdrutos);
				controller->buffer->setLabelSemaphoros(ui->labelSemaforos);
				controller->inicializaThreads();



}

